package com.user.fegin;

import com.common.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.retry.annotation.Retryable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author: stefanie-zy
 * @time: 2024/1/29-15:09
 * @description: Fegin-文件
 */
@FeignClient(name = "stefanie-file", path = "/stefanie-file", dismiss404 = true, fallback = FileServerImpl.class)
public interface FileService {

    /**
     * 获取用户默认头像
     *
     * @param userName 用户名称
     * @return 头像地址
     * @description: 接口重试次数：2
     */
    @GetMapping(value = "/api-file/user-ico")
    @Retryable(maxAttempts = 2)
    Result<?> getUserIcoUrl(@RequestParam String userName);
}
